package com.aps.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 企业级单表码表
 * </p>
 *
 * @author zhuozihan
 * @since 225-11-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("aps_code")
@Schema(name = "ApsCode对象", description = "码表")
public class ApsCode extends ExtMap {

    private static final long serialVersionUID = 1L;

    @Schema(description = "租户ID", example = "1")
    @TableField("tenant_id")
    private String tenantId;

    @Schema(description = "码表类型（唯一标识，如：USER_STATUS、ORDER_TYPE）", example = "USER_STATUS")
    private String codeType;

    @Schema(description = "码表类型名称（如：用户状态、订单类型）", example = "用户状态")
    private String codeTypeName;

    @Schema(description = "码值（唯一标识，如：ENABLED、DISABLED）", example = "ENABLED")
    private String codeValue;

    @Schema(description = "码值文本（如：启用、禁用）", example = "启用")
    private String codeText;

    @Schema(description = "排序号（用于前端展示顺序）", example = "1")
    private Integer sort;

    @Schema(description = "状态（0-禁用，1-启用）", example = "1")
    private Integer status;

    @Schema(description = "是否系统内置（0-否，1-是，不可删除）", example = "1")
    private Integer isSystem;

    @Schema(description = "扩展信息（JSON格式，如：颜色、图标等）", example = "{\"color\":\"#333333\", \"icon\":\"icon-normal\"}")
    private String extJson;

    @Schema(description = "备注", example = "系统内置状态码")
    private String remark;

}